import { createRouter, createWebHistory } from 'vue-router'

import listbase from '@/page/database/ListBase.vue'
import createdatabase from '@/page/database/CreateDataBase.vue'
import switchdatabase from '@/page/database/SwitchDataBase.vue'

import ji_chu from '@/DaoHang/ji_chu.vue'
import chang_qi from '@/DaoHang/chang_qi.vue'
import duan_qi from '@/DaoHang/duan_qi.vue'
import ke_kaoxing from '@/DaoHang/ke_kaoxing.vue'

import cost_device from '@/page/jichu/chengben/cost_device.vue'
import cost_environmental_boundary from '@/page/jichu/chengben/cost_environmental_boundary.vue'
import cost_external_electricity from '@/page/jichu/chengben/cost_external_electricity.vue'
import cost_fuel from '@/page/jichu/chengben/cost_fuel.vue'

import storage_cool from '@/page/jichu/chuneng/storage_cool.vue'
import storage_electricity from '@/page/jichu/chuneng/storage_electricity.vue'
import storage_heat from '@/page/jichu/chuneng/storage_heat.vue'
import storage_hydrogen from '@/page/jichu/chuneng/storage_hydrogen.vue'

import huanjing from '@/page/jichu/huanjing/environment_para.vue'
import shebei from '@/page/jichu/shebei/device_para.vue'

import Demand_electricity from '@/page/jichu/yonghu/Demand_electricity.vue'
import Demand_cool from '@/page/jichu/yonghu/Demand_cool.vue'
import Demand_heat from '@/page/jichu/yonghu/Demand_heat.vue'
import Demand_industrial from '@/page/jichu/yonghu/Demand_industrial.vue'
import Demand_transport from '@/page/jichu/yonghu/Demand_transport.vue'
import V2G_car from '@/page/jichu/yonghu/V2G_car.vue'

import ji_suanD from '@/page/duanqi/jisuan/ji_suan.vue'
import cheng_benD from '@/page/duanqi/chengben/cheng_ben.vue'
import chu_nengD from '@/page/duanqi/chuneng/chu_neng.vue'
import huan_jingD from '@/page/duanqi/huan_jing/huan_jing.vue'
import she_beiD from '@/page/duanqi/shebei/she_bei.vue'
import yong_huD from '@/page/duanqi/yonghu/yong_hu.vue'

import ji_suanC from '@/page/changqi/jisuan/ji_suan.vue'
import cheng_benC from '@/page/changqi/chengben/cheng_ben.vue'
import chu_nengC from '@/page/changqi/chuneng/chu_neng.vue'
import huan_jingC from '@/page/changqi/huan_jing/huan_jing.vue'
import she_beiC from '@/page/changqi/shebei/she_bei.vue'
import yong_huC from '@/page/changqi/yonghu/yong_hu.vue'

import ji_suanK from '@/page/kekaoxing/jisuan/ji_suan.vue'
import cheng_benK from '@/page/kekaoxing/chengben/cheng_ben.vue'
import chu_nengK from '@/page/kekaoxing/chuneng/chu_neng.vue'
import she_beiK from '@/page/kekaoxing/shebei/she_bei.vue'

export default createRouter({
  history: createWebHistory(),
  routes: [
    { path: '/database/listdatabase', component: listbase },
    { path: '/database/createdatabase', component: createdatabase },
    { path: '/database/switchdatabase', component: switchdatabase },

    {
      path: '/DaoHang/ji_chu',
      component: ji_chu,
      children: [
        { path: 'chengben/cost_device', component: cost_device, meta: { activeMenu: '/DaoHang/ji_chu' } },
        { path: 'chengben/cost_environmental_boundary', component: cost_environmental_boundary, meta: { activeMenu: '/DaoHang/ji_chu' } },
        { path: 'chengben/cost_external_electricity', component: cost_external_electricity, meta: { activeMenu: '/DaoHang/ji_chu' } },
        { path: 'chengben/cost_fuel', component: cost_fuel, meta: { activeMenu: '/DaoHang/ji_chu' } },
        { path: 'chuneng/storage_cool', component: storage_cool, meta: { activeMenu: '/DaoHang/ji_chu' } },
        { path: 'chuneng/storage_electricity', component: storage_electricity, meta: { activeMenu: '/DaoHang/ji_chu' } },
        { path: 'chuneng/storage_heat', component: storage_heat, meta: { activeMenu: '/DaoHang/ji_chu' } },
        { path: 'chuneng/storage_hydrogen', component: storage_hydrogen, meta: { activeMenu: '/DaoHang/ji_chu' } },
        { path: 'huanjing', component: huanjing, meta: { activeMenu: '/DaoHang/ji_chu' } },
        { path: 'shebei', component: shebei, meta: { activeMenu: '/DaoHang/ji_chu' } },
        { path: 'yonghu/Demand_electricity', component: Demand_electricity, meta: { activeMenu: '/DaoHang/ji_chu' } },
        { path: 'yonghu/Demand_cool', component: Demand_cool, meta: { activeMenu: '/DaoHang/ji_chu' } },
        { path: 'yonghu/Demand_heat', component: Demand_heat, meta: { activeMenu: '/DaoHang/ji_chu' } },
        { path: 'yonghu/Demand_industrial', component: Demand_industrial, meta: { activeMenu: '/DaoHang/ji_chu' } },
        { path: 'yonghu/Demand_transport', component: Demand_transport, meta: { activeMenu: '/DaoHang/ji_chu' } },
        { path: 'yonghu/V2G_car', component: V2G_car, meta: { activeMenu: '/DaoHang/ji_chu' } }
      ]
    },

    {
      path: '/DaoHang/duan_qi',
      component: duan_qi,
      children: [
        { path: 'ji_suanD', component: ji_suanD, meta: { activeMenu: '/DaoHang/duan_qi' } },
        { path: 'she_beiD', component: she_beiD, meta: { activeMenu: '/DaoHang/duan_qi' } },
        { path: 'chu_nengD', component: chu_nengD, meta: { activeMenu: '/DaoHang/duan_qi' } },
        { path: 'cheng_benD', component: cheng_benD, meta: { activeMenu: '/DaoHang/duan_qi' } },
        { path: 'huan_jingD', component: huan_jingD, meta: { activeMenu: '/DaoHang/duan_qi' } },
        { path: 'yong_huD', component: yong_huD, meta: { activeMenu: '/DaoHang/duan_qi' } }
      ]
    },

    {
      path: '/DaoHang/chang_qi',
      component: chang_qi,
      children: [
        { path: 'ji_suanC', component: ji_suanC, meta: { activeMenu: '/DaoHang/chang_qi' } },
        { path: 'she_beiC', component: she_beiC, meta: { activeMenu: '/DaoHang/chang_qi' } },
        { path: 'chu_nengC', component: chu_nengC, meta: { activeMenu: '/DaoHang/chang_qi' } },
        { path: 'cheng_benC', component: cheng_benC, meta: { activeMenu: '/DaoHang/chang_qi' } },
        { path: 'huan_jingC', component: huan_jingC, meta: { activeMenu: '/DaoHang/chang_qi' } },
        { path: 'yong_huC', component: yong_huC, meta: { activeMenu: '/DaoHang/chang_qi' } }
      ]
    },

    {
      path: '/DaoHang/ke_kaoxing',
      component: ke_kaoxing,
      children: [
        { path: 'ji_suanK', component: ji_suanK, meta: { activeMenu: '/DaoHang/ke_kaoxing' } },
        { path: 'she_beiK', component: she_beiK, meta: { activeMenu: '/DaoHang/ke_kaoxing' } },
        { path: 'chu_nengK', component: chu_nengK, meta: { activeMenu: '/DaoHang/ke_kaoxing' } },
        { path: 'cheng_benK', component: cheng_benK, meta: { activeMenu: '/DaoHang/ke_kaoxing' } }
      ]
    }
  ]
})
